<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@	page import="com.yaodian100.core.common.utils.ServerValue"%>
<c-rt:set var="midContextPath" value='<%=ServerValue.getMidContextPath()%>'/>
<script language="javascript">
$().ready(function(){
	$("#submitBtn").click(function(){
		if ( $("#updEmail").val() == "" ){
			alert("请输入email");
			return false;
		}else{
			$.post("${midContextPath}/member/updEmail.do", $("#updEmailForm").serialize(), callbackFun, "json");
		}
	});
	function callbackFun(emailResult){
		if ( emailResult == "" ){
			alert("修改成功");
			closeDialog();
			location.href="${midContextPath}/member/view.do?memberId=${memberId}";
		}else
			alert(emailResult);
	}
	$("#cancelBtn").click(function(){
		closeDialog();
	});
});
</script>
<s:form action="updEmail.do" method="post" id="updEmailForm">
		<table class="tb-data">
			<tr>
				<th>請輸入email</th>
				<td><input type="text" id="updEmail" name="updEmail"/></td>
			</tr>
		</table>
		<input type="hidden" name="memberId" value="${memberId}"/>
		<input type="button" id="submitBtn" value="送出"/>
		<input type="button" id="cancelBtn" value="取消"/>
	</s:form>